<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/templates/template.xhtml">

	<ui:define name="checkLogon">
		<f:event listener="#{userBean.checkLogin}" type="preRenderView"></f:event>
	</ui:define>

	<ui:define name="cssTwo">
		<link href="../css/styleButton.css" rel="stylesheet" type="text/css" />
		<style type="text/css">
td {
	font-weight: bold;
}

tr {
	margin-bottom: 20px;
}

input {
	width: 310px;
	height: 28px;
	font-weight: normal;
	margin-bottom: 20px;
}

.error {
	color: red;
}

#getPassword {
	margin-left: 60px;
	padding-left: 20px;
	background-color: #E6E6E6;
	width: 380px;
}
</style>
	</ui:define>

	<ui:define name="content">
		<div id="getPassword">
			<fieldset style="width: 370px; border: none;">
				<legend
					style="font-weight: bold; font-size: 19px; padding-top: 8px;">Logon</legend>
				<h:form>
					<h:panelGrid>
						<h:outputText value="Your name" style="margin-bottom:20px;"></h:outputText>

						<h:panelGroup>
							<p:inputText style="width:145px;margin-right:15px;"
								value="#{userBean.userVO.lastName}" />
							<p:inputText style="width:145px;" id="fN"
								value="#{userBean.userVO.firstName}" />
						</h:panelGroup>

						<h:message styleClass="error" for="fN"></h:message>

						<h:outputText value="User name"></h:outputText>

						<p:inputText id="uN" value="#{userBean.userName}" required="true"
							requiredMessage="User name is required"></p:inputText>

						<h:message styleClass="error" for="uN"></h:message>

						<h:outputText value="Password"></h:outputText>

						<p:password id="pS" value="#{userBean.userVO.password}"
							feedback="true" inline="true" required="true"
							requiredMessage="Password is required" />

						<h:message styleClass="error" for="pS"></h:message>

						<h:outputText value="Email"></h:outputText>

						<p:inputText id="em" value="#{userBean.userVO.email}"
							required="true" requiredMessage="Password is required" />

						<h:message for="em" styleClass="error"></h:message>

						<h:outputText value="Birthday"></h:outputText>

						<h:panelGroup>
							<p:selectOneMenu style="width:87px;" id="day"
								value="#{userBean.userVO.day}">
								<f:selectItem itemLabel="AS" itemValue="AS"></f:selectItem>
							</p:selectOneMenu>
							<p:selectOneMenu style="width:115px;" id="month"
								value="#{userBean.userVO.month}">
								<f:selectItem itemLabel="AS" itemValue="AS"></f:selectItem>
							</p:selectOneMenu>
							<p:selectOneMenu style="width:126px;" id="year"
								value="#{userBean.userVO.year}">
								<f:selectItem itemLabel="AS" itemValue="AS"></f:selectItem>
							</p:selectOneMenu>
						</h:panelGroup>


						<h:outputText value="Sex"></h:outputText>

						<p:selectOneMenu value="#{userBean.userVO.sex}"
							style="width:330px;margin-bottom:15px;">
							<f:selectItem itemLabel="Male" itemValue="Male"></f:selectItem>
							<f:selectItem itemLabel="Female" itemValue="FeMale"></f:selectItem>
							<f:selectItem itemLabel="Other" itemValue="Other"></f:selectItem>
						</p:selectOneMenu>

						<h:panelGroup>
							<h:commandButton action="#{userBean.logon}" value="Save"
								styleClass="styleButton"></h:commandButton>
							<h:button outcome="index.jsf" value="Back"
								styleClass="styleButton"></h:button>
						</h:panelGroup>
					</h:panelGrid>
				</h:form>
			</fieldset>
		</div>
	</ui:define>
</ui:composition>
</html>
